<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<x:parse xml="${param.xmlstr}" var="xmlData" />
<c:set var="grant_code"><x:out select="$xmlData/data/proposal/grant_code" /></c:set>
<c:set var="sub_grant_code"><x:out select="$xmlData/data/proposal/sub_grant_code" /></c:set>

<div class="t_bar">申请贷款付息情况（万元）</div>
<table class="table01 t_css" width="100%" border="0" cellpadding="0" id="fin1"
	cellspacing="1">
	<tr>
	    <td width="200" align="left">贷款银行</td>
		<td colspan="2">
			<x:out select="$xmlData/data/loan/bank" />
		</td>
		<td width="200" align="left">企业在贷款银行开户账号</td>
		<td colspan="2">
			<x:out select="$xmlData/data/loan/bank_account" />
		</td>
		
	</tr>
	<tr>
	    <td width="200" align="left">授信合同编号</td>
		<td colspan="2">
			<x:out select="$xmlData/data/loan/contract_no" />
		</td>
		<td width="200" align="left">授信额度</td>
		<td colspan="2">
			<x:out select="$xmlData/data/loan/credit" />
		</td>
	</tr>
	<tr>
	    <td width="200" align="left">授信期限</td>
		<td colspan="5">
			<x:out select="$xmlData/data/loan/credit_period" />
		</td>
	</tr>
</table>
<table class="table01" width="100%" border="0" cellpadding="0"
	id="tblloans" cellspacing="1">
    <thead>
		<tr>
			<th class="TblHead" align="center" width="7%">序号</th>
			<th class="TblHead" align="center" width="11%">贷款合同/借据编号 </th>
			<th class="TblHead" align="center" width="11%">贷款金额 </th>
			<th class="TblHead" align="center" width="11%">贷款期限 </th>
			<th class="TblHead" align="center" width="11%">年利率 </th>
			<th class="TblHead" align="center" width="11%">计息方式 </th>
			<th class="TblHead" align="center" width="11%">利息总额 </th>
			<th class="TblHead" align="center" width="11%">已付利息 </th>
		</tr>
			</thead>
			<tbody id="tab">
					<c:set value="0" var="index" scope="page"/>
					<x:forEach select="$xmlData/data/loans/loan" var="loans">
					<c:choose>
						<c:when test="${index<10}" >
						<c:set value="0" var="flag" scope="page"/>
						</c:when>
						<c:otherwise>
						<c:set value="" var="flag" scope="page"/>
						</c:otherwise>
					</c:choose>
					<tr>
						<td style="text-align:center;">
							<span name="loans/loan[${flag}${index}]@seq_no" >${index+1}</span> 
						</td>
						<td style="text-align:center;">
							<x:out select="$loans/loan_contract" />&nbsp;
						</td>
						<td style="text-align:center;">
							<x:out select="$loans/money" />&nbsp;
						</td>
						<td style="text-align:center;">
							<x:out select="$loans/date" />&nbsp;
						</td>
						<td style="text-align:center;">
							<x:out select="$loans/per_annum" />&nbsp;
						</td>
					    <td style="text-align:center;">
							<x:out select="$loans/type" />&nbsp;
						</td>
						<td style="text-align:center;">
							<x:out select="$loans/total" />&nbsp;
						</td>
						<td style="text-align:center;">
							<x:out select="$loans/interest" />&nbsp;
						</td>
					</tr>
					<c:set value="${index+1}" var="index" scope="page"/>
					</x:forEach>
				</tbody>
			</table>
			<table class="t_css" cellpadding="0" cellspacing="0" width="100%" align="center">
                <tr>
		            <td colspan="1"  class="thclass" nowrap >实际已付利息总额：</td>
		            <td colspan="1" class="thclass" width="800px">
			           <x:out select="$xmlData/data/loansamt/interest_total" />
		            </td>
		          
               </tr>						
            </table>
            <table class="t_css" cellpadding="0" cellspacing="0" width="100%" align="center">
                <tr>
		            <td colspan="1"  class="thclass" nowrap >申请贷款贴息金额：</td>
		            <td colspan="1" class="thclass" width="800px" >
			           <x:out select="$xmlData/data/loansamt/loan_total" />
		          </td>
		          
               </tr>						
            </table>
			<br>	        
<div class="t_bar"><span class="color_red">*</span>贷款付息明细</div>
<table class="table01" width="100%" border="0" cellpadding="0"
	id="tblloandetails" cellspacing="1">
    <thead>
		<tr>
			<th class="TblHead" align="center" width="10%">序号</th>
			<th class="TblHead" align="center" width="30%">付息日期 </th>
			<th class="TblHead" align="center" width="30%">付息凭证号码 </th>
			<th class="TblHead" align="center" width="20%">付息金额（万元） </th>
		</tr>
			</thead>
			<tbody id="tab">
					<c:set value="0" var="index" scope="page"/>
					<x:forEach select="$xmlData/data/loandetails/loandetail" var="loandetails">
					<c:choose>
						<c:when test="${index<10}" >
						<c:set value="0" var="flag" scope="page"/>
						</c:when>
						<c:otherwise>
						<c:set value="" var="flag" scope="page"/>
						</c:otherwise>
					</c:choose>
					<tr>
						<td style="text-align:center;">
							<span name="loandetails/loandetail[${flag}${index}]@seq_no" >${index+1}</span> 
						</td>
						<td nowrap="nowrap" style="text-align:center;">
					        <x:out select="$loandetails/payment_date"/>&nbsp;
					    </td>
					    <td style="text-align:center;">
							<x:out select="$loandetails/payment_no" />&nbsp;
						</td>
						
						<td style="text-align:center;">
							<x:out select="$loandetails/payment_money" />&nbsp;
						</td>
					</tr>
					<c:set value="${index+1}" var="index" scope="page"/>
					</x:forEach>
				</tbody>
			</table>
<script type="text/javascript">
	$(function() {
		$("#fin1 tr:even").addClass("li_1");
		$("#fin1 tr:odd").addClass("li_2");
		$("#tblloandetails tr:even").addClass("li_1");
		$("#tblloandetails tr:odd").addClass("li_2");
	});
</script>